<!--理想的地球模型-->
<template>
  <div>
    <div id="container02" style="height: 100%; width: 100%; margin: 0"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts'
import  'echarts-gl'
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "globe",
  data() {
    return {
      ROOT_PATH1: 'https://echarts.apache.org/examples',
    }
  },
  mounted() {
    this.initChart()
  },
  methods: {
    // 初始化 表格组件
    initChart() {
      // 基于准备好的dom，初始化echarts实例
      // let ROOT_PATH = 'https://echarts.apache.org/examples';

      let chartDom = document.getElementById('container02')
      let myChart = echarts.init(chartDom)
      let option

      option = {
        backgroundColor: '#000',
        globe: {
          baseTexture: require('@/assets/echarts/earth.jpg'),
          shading: 'lambert',
          environment:  require('@/assets/echarts/starfield.jpg'),
          // 是否显示大气层
          atmosphere: {
            show: true,
          },
          light: {
            ambient: {
              intensity: 0.2,
            },
            main: {
              intensity: 1.4,
            },
          },
        },
        series: [],
      }

      // 绘制图表
      myChart.setOption(option)
    },
  },
}
</script>

<style scoped>

</style>
